package com.mingtu.jgspatrol.room;

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

import com.mingtu.jgspatrol.converter.AttachVOSBeanConverter;
import com.mingtu.jgspatrol.converter.MyAttachVOSBeanConverter;
import com.mingtu.jgspatrol.converter.PicVideoArrayConverter;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

/**
 * @ClassName :
 * @Author : wkk
 * @Date : 2022-8-3 17:22:20
 * @Email : 1281573890@qq.com
 * @Eescription :
 */
//Room 将类名称用作数据库表名称。如果您希望表具有不同的名称，请设置 @Entity 注解的 tableName 属性
//Room 默认使用字段名称作为数据库中的列名称。如果您希望列具有不同的名称，请将 @ColumnInfo 注解添加到该字段并设置 name 属性
@Entity
public class SignInEvent {

    @PrimaryKey(autoGenerate = true)
    public int id;
    private String lat;
    private String lng;
    private String content;
    private String clockTime;

    @TypeConverters(AttachVOSBeanConverter.class)
    private List<AttachVOSBean> attachVOS;
    @TypeConverters(MyAttachVOSBeanConverter.class)
    private List<MyattachVOSBean> MyattachVOS;
    @TypeConverters(PicVideoArrayConverter.class)
    private ArrayList<LinkedHashMap<String, Object>> picVideoArray;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getClockTime() {
        return clockTime;
    }

    public void setClockTime(String clockTime) {
        this.clockTime = clockTime;
    }


    public List<AttachVOSBean> getAttachVOS() {
        return attachVOS;
    }

    public void setAttachVOS(List<AttachVOSBean> attachVOS) {
        this.attachVOS = attachVOS;
    }

    public List<MyattachVOSBean> getMyattachVOS() {
        return MyattachVOS;
    }

    public void setMyattachVOS(List<MyattachVOSBean> MyattachVOS) {
        this.MyattachVOS = MyattachVOS;
    }

    public ArrayList<LinkedHashMap<String, Object>> getPicVideoArray() {
        return picVideoArray;
    }

    public void setPicVideoArray(ArrayList<LinkedHashMap<String, Object>> picVideoArray) {
        this.picVideoArray = picVideoArray;
    }

    @Entity
    public static class AttachVOSBean {
        /**
         * type : 1
         * url : https://static.mingtukeji.com/dbs/202111/20211103/1fe6555ddf0e4c9b8c901439ab3246c5.jpeg
         */
        @PrimaryKey(autoGenerate = true)
        public int id;
        private String url;


        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    @Entity
    public static class MyattachVOSBean {
        /**
         * pathName : /storage/emulated/0/Android/data/com.mingtu.dbspatrol/files/Pictures/IMG_CMP_196171796.jpeg
         * type : 1
         */
        @PrimaryKey(autoGenerate = true)
        public int id;
        private String pathName;

        public String getPathName() {
            return pathName;
        }

        public void setPathName(String pathName) {
            this.pathName = pathName;
        }


    }
}


